package com.ygnn.common.Pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

/**
 * ClassName:Order
 * Package:com.ygnn.common.Pojo
 * Description:
 *
 * @Author: dlh
 * @Creat:2024/10/8-22:09
 */
@Data
@ApiModel("订单表")
public class Order implements Serializable {
    /**
     * 订单状态 1待支付 2下单中 3下单成功 4已退款
     */
    public static final Integer NoPay = 1;
    public static final Integer ING = 2;
    public static final Integer SUCCESS = 3;
    public static final Integer REFUNDED = 4;


    @ApiModelProperty("订单id")
    private long orderId;
    @ApiModelProperty("openid")
    private String openid;
    @ApiModelProperty("乐跑id")
    private Integer userId;
    @ApiModelProperty("乐跑次数")
    private Integer times;
    @ApiModelProperty("乐跑km数")
    private Integer km;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("乐跑开始时间")
    private Date startDate;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("乐跑到期时间")
    private Date endDate;
    @ApiModelProperty("金额")
    private Integer amount;
    @ApiModelProperty("订单状态")
    private Integer status;
    @ApiModelProperty("下单时间")
    private Date creatTime;
}
